package org.codingeasy.oauth.client.springboot.config;

import org.codingeasy.oauth.client.OAuthClientFilter;
import org.codingeasy.oauth.client.OAuthProperties;
import org.codingeasy.oauth.client.utils.LocalStore;
import org.springframework.boot.context.properties.NestedConfigurationProperty;

import java.util.ArrayList;
import java.util.List;


/**
* oauth配置  
* @author : KangNing Hu
*/
public class OAuthClientProperties {


	/**
	 * 授权方式配置列表
	 */
	List<OAuthProperties> properties = new ArrayList<>();

	/**
	 * 登录path
	 */
	private String loginUrl = OAuthClientFilter.LOGIN_PATH;

	/**
	 * 回调的path
	 */
	private String callbackUrl = OAuthClientFilter.CALL_PATH;

	/**
	 * xsrf token 和 oauth name的存储方式
	 */
	private LocalStore.Type type = LocalStore.Type.SESSION;


	public String getLoginUrl() {
		return loginUrl;
	}

	public void setLoginUrl(String loginUrl) {
		this.loginUrl = loginUrl;
	}

	public String getCallbackUrl() {
		return callbackUrl;
	}

	public void setCallbackUrl(String callbackUrl) {
		this.callbackUrl = callbackUrl;
	}

	public LocalStore.Type getType() {
		return type;
	}

	public void setType(LocalStore.Type type) {
		this.type = type;
	}

	public List<OAuthProperties> getProperties() {
		return properties;
	}

	public void setProperties(List<OAuthProperties> properties) {
		this.properties = properties;
	}
}
